<template>
  <div>
    <div v-bind="$attrs">{{ title }}</div>
    <little-button v-bind="$attrs" v-on="$listeners"></little-button>
    <button @click="grandFather">这是一个按钮</button>
  </div>
</template>
<script>
import LittleButton from "../LoginLittleButton/LIttleButton.vue"
export default {
  components: {
    LittleButton
  },
  props: {
    name: {
      type: String,
      default: '',
      required: false
    }
  },
  // props
  data() {
   return {
    title: '',
    LoginButton: 'LoginButton'
   } 
  },
  // 页面加载的钩子函数
  mounted() {
    console.log(this.$attrs,13)
    this.title = this.$attrs.loginText;
    // this.$emit("grandFather",this.LoginButton)
    // console.log(this.$listeners)
  },
  methods: {
    grandFather() {
      // console.log(this.$listeners,13)
      
    }
  }
}
</script>